# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Marcel Huber <marcelhuberfoo at gmail dott com>
# Contributor: Illarion Kovalchuk <illarion.kovalchuk at gmail dot com>

pkgname=jenkins
pkgver=2.402
pkgrel=1
pkgdesc='Extendable continuous integration server (latest)'
arch=('any')
url='https://jenkins.io'
license=('MIT')
depends=('java-runtime=11' 'ttf-dejavu')
provides=('jenkins-ci')
conflicts=('jenkins-ci')
replaces=('jenkins-ci')
backup=('etc/conf.d/jenkins')
install='jenkins.install'
noextract=("jenkins-${pkgver}.war")
source=("jenkins-${pkgver}.war::http://mirrors.jenkins-ci.org/war/${pkgver}/jenkins.war"
        # Rename to force re-download on new version
        'jenkins.conf'
        'jenkins.service'
        'jenkins.tmpfiles'
        'jenkins.sysusers'
        'LICENSE')
sha512sums=('2e602ed4bf90f3e90f755bb3ad2456c0b0f251f4a0106aa61a0dccc7ce842bd96e06f106dda0f6d318f80d3113923068740195cd0d12e7e9af8b87af0a8fd7d2'
            'e4e58b3717a296572141a729007b7edb05f2702d09461cdd286637ad75d1e1f583127ef067e6c458eeb507049a306d7f2c57c88811d9b8d7bc054fc337692c2e'
            '320e3d7bcdb78861e829e97be3ec37b8f1846737032ba70f624dfc5be86569d527279f53654a4a22d78b816ff1b07df429725a1d0a8059d44900d1095d1189ab'
            'a845a7147be54affc586dfce9a188ec24c92e673e88dec0b62da386d2e597de6ecda103429008562abd897f179a52c37cf2188ebc65b8c636efd07d707e18f90'
            '896cbc64eadb2f3bb9fa7fc26dbfc527b1823d8bff3158be7f1936cc250f55eeafe89079e1ceb8f3d269041662573ccbbb36248140b4ba24144a564366f8847a'
            '0df6479a600db395c12ad29ebda3120d00460338b9a6b15913e2245aa29212a3798c32e664ca70c8034146e2e0b573066deec9e3210198202f753994e1b83efa')

package() {
  install -Dm444 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm444 "jenkins-${pkgver}.war" "$pkgdir/usr/share/java/jenkins/jenkins.war"
  install -Dm644 jenkins.service \
    "$pkgdir/usr/lib/systemd/system/jenkins.service"
  install -Dm644 jenkins.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/jenkins.conf"
  install -Dm644 jenkins.sysusers "$pkgdir/usr/lib/sysusers.d/jenkins.conf"
  install -Dm644 jenkins.conf "$pkgdir/etc/conf.d/jenkins"
}

# vim:set ts=2 sw=2 et:
